﻿@model CRM_AKCPA.Models.Invoice

@{
    ViewBag.Title = "Edit";
}

<h2>Edit</h2>


@using (Html.BeginForm())
{
    @Html.AntiForgeryToken()
    
    <div class="form-horizontal">
        <h4>Invoice</h4>
        <hr />
        @Html.ValidationSummary(true)
        @Html.HiddenFor(model => model.Invoice_ID)

        <div class="form-group">
            @Html.LabelFor(model => model.Invoice_Number, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.Invoice_Number)
                @Html.ValidationMessageFor(model => model.Invoice_Number)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.Invoice_Name, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.Invoice_Name)
                @Html.ValidationMessageFor(model => model.Invoice_Name)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.Description, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.Description)
                @Html.ValidationMessageFor(model => model.Description)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.Invoice_Date, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.Invoice_Date)
                @Html.ValidationMessageFor(model => model.Invoice_Date)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.Invoice_Amount, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.Invoice_Amount)
                @Html.ValidationMessageFor(model => model.Invoice_Amount)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.Due_Amount, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.Due_Amount)
                @Html.ValidationMessageFor(model => model.Due_Amount)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.DueDate, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.DueDate)
                @Html.ValidationMessageFor(model => model.DueDate)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.Paid_StatusID, "Paid_StatusID", new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.DropDownList("Paid_StatusID", String.Empty)
                @Html.ValidationMessageFor(model => model.Paid_StatusID)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.Payment_TermID, "Payment_TermID", new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.DropDownList("Payment_TermID", String.Empty)
                @Html.ValidationMessageFor(model => model.Payment_TermID)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.CustomerId, "CustomerId", new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.DropDownList("CustomerId", String.Empty)
                @Html.ValidationMessageFor(model => model.CustomerId)
            </div>
        </div>

        <div class="form-group">
            <div class="col-md-offset-2 col-md-10">
                <input type="submit" value="Save" class="btn btn-default" />
            </div>
        </div>
    </div>
}

<div>
    @Html.ActionLink("Back to List", "Index")
</div>

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}
